<template>
  <!-- 图数据预览 -->
  <div id="data-preview-table" class="graph-data-preview-card">
    <pre class="owl-preview">
      <!-- 内容有截取，是因为后端返回长度有限 -->
      {{ kGraphPreviewData }}
    </pre>
  </div>
</template>

<script lang="ts">
/**
 * 图谱数据导入 图谱数据预览
 */
import { Component, Vue } from 'vue-property-decorator'
import DataUploadStore from '@/store/modules/data-upload'

@Component({
  components: {},
})
export default class KGraphDataPreview extends Vue {
  // 图文件预览数据
  public get kGraphPreviewData() {
    return DataUploadStore.kGraphPreviewData
  }
}
</script>
<style lang="less" scoped>
.graph-data-preview-card {
  .owl-preview {
    border: 1px solid #e9e9e9;
    max-height: 450px;
    overflow: auto;
  }

  &::-webkit-scrollbar {
    height: 6px;
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(144, 147, 153, 0.5);
    border-radius: 6px;
  }

  &::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 5px;
  }
}
</style>
